process {

    publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

    withName: 'LIMMA_DIFFERENTIAL' {
        ext.args = { [
            "--sample_id_col name",
            "--blocking_variables $meta.blocking"
        ].join(' ').trim() }
    }

    withName: 'AFFY_JUSTRMA' {
        ext.args = "--sample_name_col name"
        publishDir = [ enabled: false ]
    }
    withName: 'UNTAR' {
        publishDir = [ enabled: false ]
    }
}
